package com.madi.company.api;


import com.madi.company.bean.PersonalCenterEntity;
import com.madi.company.bean.SearchResumeEntity;
import com.madi.company.bean.TokenEntity;
import com.madi.company.bean.UserInfoEntity;

import java.util.Map;

import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.POST;
import rx.Observable;

/**
 * des:ApiService
 * Created by dn
 * on 2016.06.15:47
 * 1234567788888888
 */
public interface ApiService {




    // 用户登录
    @FormUrlEncoded
    @POST("hr/p/Login? ")
    Observable<UserInfoEntity> getUserInfo(
            @Field("Cache-Control") String cacheControl,
            @FieldMap Map<String, String> map);


    // 刷新token
    @FormUrlEncoded
    @POST("p/ReAuth?")
    Observable<TokenEntity> refreshToken(
            @Header("Cache-Control") String cacheControl,
            @Field("refresh_token") String token);

    // 刷新token
    @FormUrlEncoded
    @POST("hr/p/SearchResume?")
    Observable<SearchResumeEntity> getResumeListData(
            @Header("Cache-Control") String cacheControl,
            @FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("hr/PersonalCenter?")
    Observable<PersonalCenterEntity> gerPresonData(
            @Header("Cache-Control") String cacheControl,
            @FieldMap Map<String, String> map);
}
